<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Bluetooth Host Stack Library: Advertisement &amp; Scan</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Bluetooth Host Stack Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__btm__ble__adv__scan__functions.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Advertisement &amp; Scan<div class="ingroups"><a class="el" href="group__wicedbt___legacy.html">LE Legacy Mode Advertising and Scanning</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>This section provides functions for LE advertisement and LE scan operations. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga90a7b45015280a2dcef73a5be07cd561"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#ga90a7b45015280a2dcef73a5be07cd561">wiced_bt_start_advertisements</a> (<a class="el" href="group__wicedbt___device_management.html#gad1d90fe02e687ba52b02f970cb0ad3d3">wiced_bt_ble_advert_mode_t</a> advert_mode, <a class="el" href="group__bt__types.html#ga97897f7408c23723933e9d21815c7294">wiced_bt_ble_address_type_t</a> directed_advertisement_bdaddr_type, <a class="el" href="group__bt__types.html#gaf2107358511d590ad4bc0f61a837978c">wiced_bt_device_address_ptr_t</a> directed_advertisement_bdaddr_ptr)</td></tr>
<tr class="memdesc:ga90a7b45015280a2dcef73a5be07cd561"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start advertising.  <a href="#ga90a7b45015280a2dcef73a5be07cd561">More...</a><br /></td></tr>
<tr class="separator:ga90a7b45015280a2dcef73a5be07cd561"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0ba60f6bd5a99be06f8ddd879da9b248"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__wicedbt___device_management.html#gad1d90fe02e687ba52b02f970cb0ad3d3">wiced_bt_ble_advert_mode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#ga0ba60f6bd5a99be06f8ddd879da9b248">wiced_bt_ble_get_current_advert_mode</a> (void)</td></tr>
<tr class="memdesc:ga0ba60f6bd5a99be06f8ddd879da9b248"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current advertising mode.  <a href="#ga0ba60f6bd5a99be06f8ddd879da9b248">More...</a><br /></td></tr>
<tr class="separator:ga0ba60f6bd5a99be06f8ddd879da9b248"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab51079605334c28e06d02f44ffd5ec6b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#gab51079605334c28e06d02f44ffd5ec6b">wiced_bt_ble_set_raw_advertisement_data</a> (uint8_t num_elem, <a class="el" href="structwiced__bt__ble__advert__elem__t.html">wiced_bt_ble_advert_elem_t</a> *p_data)</td></tr>
<tr class="memdesc:gab51079605334c28e06d02f44ffd5ec6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set advertisement raw data to the controller.  <a href="#gab51079605334c28e06d02f44ffd5ec6b">More...</a><br /></td></tr>
<tr class="separator:gab51079605334c28e06d02f44ffd5ec6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed7a2250e3d40e66a23167febfbbebd4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gentypes.html#ga2bc92bd117cfd3f6ec4ae452e6ced064">wiced_bool_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#gaed7a2250e3d40e66a23167febfbbebd4">wiced_btm_ble_update_advertisement_filter_policy</a> (<a class="el" href="group__wicedbt___common.html#ga9f721100e521471e5a9cc5f9adcd92d4">wiced_bt_ble_advert_filter_policy_t</a> advertising_policy)</td></tr>
<tr class="memdesc:gaed7a2250e3d40e66a23167febfbbebd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the advertising filter policy of legacy advertiser.  <a href="#gaed7a2250e3d40e66a23167febfbbebd4">More...</a><br /></td></tr>
<tr class="separator:gaed7a2250e3d40e66a23167febfbbebd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f1db3380fcc8c1a93b3e0f34b302ff0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#ga7f1db3380fcc8c1a93b3e0f34b302ff0">wiced_bt_ble_set_adv_tx_power</a> (int8_t power, <a class="el" href="group__wicedbt__dev__utils.html#ga5efde2f4a4954a99dc729af308ce90bf">wiced_bt_dev_vendor_specific_command_complete_cback_t</a> *p_cb)</td></tr>
<tr class="memdesc:ga7f1db3380fcc8c1a93b3e0f34b302ff0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command to set LE Advertisement tx power.  <a href="#ga7f1db3380fcc8c1a93b3e0f34b302ff0">More...</a><br /></td></tr>
<tr class="separator:ga7f1db3380fcc8c1a93b3e0f34b302ff0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37a11fc558b6587f8c7288aa943edf06"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#ga37a11fc558b6587f8c7288aa943edf06">wiced_bt_ble_read_adv_tx_power</a> (<a class="el" href="group__wicedbt__dev__utils.html#ga2ebace7053dc297ea21b0e97cd0b1ce3">wiced_bt_dev_cmpl_cback_t</a> *p_cback)</td></tr>
<tr class="memdesc:ga37a11fc558b6587f8c7288aa943edf06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read LE Advertisement transmit power.  <a href="#ga37a11fc558b6587f8c7288aa943edf06">More...</a><br /></td></tr>
<tr class="separator:ga37a11fc558b6587f8c7288aa943edf06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga575e3d625d0ae6ddae781a855ba538a2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_bt_dev_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#ga575e3d625d0ae6ddae781a855ba538a2">wiced_bt_ble_set_raw_scan_response_data</a> (uint8_t num_elem, <a class="el" href="structwiced__bt__ble__advert__elem__t.html">wiced_bt_ble_advert_elem_t</a> *p_data)</td></tr>
<tr class="memdesc:ga575e3d625d0ae6ddae781a855ba538a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set scan response raw data.  <a href="#ga575e3d625d0ae6ddae781a855ba538a2">More...</a><br /></td></tr>
<tr class="separator:ga575e3d625d0ae6ddae781a855ba538a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaead34268d19ff7ea316c687d15714ee9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_bt_dev_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#gaead34268d19ff7ea316c687d15714ee9">wiced_bt_ble_observe</a> (<a class="el" href="group__gentypes.html#ga2bc92bd117cfd3f6ec4ae452e6ced064">wiced_bool_t</a> start, uint8_t duration, <a class="el" href="group__wicedbt___legacy.html#ga171a4706dce6ec6d118ec688e7dab0a4">wiced_bt_ble_scan_result_cback_t</a> *p_scan_result_cback)</td></tr>
<tr class="memdesc:gaead34268d19ff7ea316c687d15714ee9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function makes the device start or stop operating in the observer role.  <a href="#gaead34268d19ff7ea316c687d15714ee9">More...</a><br /></td></tr>
<tr class="separator:gaead34268d19ff7ea316c687d15714ee9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac2aa0e611a70b09bfc6c4c48b99abb95"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#gac2aa0e611a70b09bfc6c4c48b99abb95">wiced_bt_ble_scan</a> (<a class="el" href="group__wicedbt___device_management.html#gafaba53a20aad0fb7a2536d9c2df7c96e">wiced_bt_ble_scan_type_t</a> scan_type, <a class="el" href="group__gentypes.html#ga2bc92bd117cfd3f6ec4ae452e6ced064">wiced_bool_t</a> duplicate_filter_enable, <a class="el" href="group__wicedbt___legacy.html#ga171a4706dce6ec6d118ec688e7dab0a4">wiced_bt_ble_scan_result_cback_t</a> *p_scan_result_cback)</td></tr>
<tr class="memdesc:gac2aa0e611a70b09bfc6c4c48b99abb95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start LE scanning.  <a href="#gac2aa0e611a70b09bfc6c4c48b99abb95">More...</a><br /></td></tr>
<tr class="separator:gac2aa0e611a70b09bfc6c4c48b99abb95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga397017f8e317d9c93785e719d7ca07cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__wicedbt___device_management.html#gafaba53a20aad0fb7a2536d9c2df7c96e">wiced_bt_ble_scan_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#ga397017f8e317d9c93785e719d7ca07cf">wiced_bt_ble_get_current_scan_state</a> (void)</td></tr>
<tr class="memdesc:ga397017f8e317d9c93785e719d7ca07cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current scan state.  <a href="#ga397017f8e317d9c93785e719d7ca07cf">More...</a><br /></td></tr>
<tr class="separator:ga397017f8e317d9c93785e719d7ca07cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0bea5c2a300878c50f582866fe5b3223"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#ga0bea5c2a300878c50f582866fe5b3223">wiced_bt_ble_update_scanner_filter_policy</a> (<a class="el" href="group__wicedbt___legacy.html#ga6d09736846bcb960a4fd36934d24bfef">wiced_bt_ble_scanner_filter_policy_t</a> scanner_policy)</td></tr>
<tr class="memdesc:ga0bea5c2a300878c50f582866fe5b3223"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the scanning filter policy for legacy scanning.  <a href="#ga0bea5c2a300878c50f582866fe5b3223">More...</a><br /></td></tr>
<tr class="separator:ga0bea5c2a300878c50f582866fe5b3223"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d62204cf6ab289f977215c08d5864ca"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__btm__ble__adv__scan__functions.html#ga8d62204cf6ab289f977215c08d5864ca">wiced_bt_ble_check_advertising_data</a> (uint8_t *p_adv, <a class="el" href="group__wicedbt___common.html#ga3764eb118b409b406eedbb158262a91f">wiced_bt_ble_advert_type_t</a> type, uint8_t *p_length)</td></tr>
<tr class="memdesc:ga8d62204cf6ab289f977215c08d5864ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse advertising data (returned from scan results callback <a class="el" href="group__wicedbt___legacy.html#ga171a4706dce6ec6d118ec688e7dab0a4" title="Callback to receive legacy scan results.">wiced_bt_ble_scan_result_cback_t</a>).  <a href="#ga8d62204cf6ab289f977215c08d5864ca">More...</a><br /></td></tr>
<tr class="separator:ga8d62204cf6ab289f977215c08d5864ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga90a7b45015280a2dcef73a5be07cd561"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga90a7b45015280a2dcef73a5be07cd561">&#9670;&nbsp;</a></span>wiced_bt_start_advertisements()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a> wiced_bt_start_advertisements </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__wicedbt___device_management.html#gad1d90fe02e687ba52b02f970cb0ad3d3">wiced_bt_ble_advert_mode_t</a>&#160;</td>
          <td class="paramname"><em>advert_mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__bt__types.html#ga97897f7408c23723933e9d21815c7294">wiced_bt_ble_address_type_t</a>&#160;</td>
          <td class="paramname"><em>directed_advertisement_bdaddr_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__bt__types.html#gaf2107358511d590ad4bc0f61a837978c">wiced_bt_device_address_ptr_t</a>&#160;</td>
          <td class="paramname"><em>directed_advertisement_bdaddr_ptr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start advertising. </p>
<p>Use <a class="el" href="group__btm__ble__adv__scan__functions.html#gab51079605334c28e06d02f44ffd5ec6b" title="Set advertisement raw data to the controller.">wiced_bt_ble_set_raw_advertisement_data</a> to configure advertising data prior to starting avertisements. The advertisements are stopped upon successful LE connection establishment.</p>
<dl class="section note"><dt>Note</dt><dd>1. Steps for undirected ADVs viz., BTM_BLE_ADVERT_UNDIRECTED_HIGH, BTM_BLE_ADVERT_UNDIRECTED_LOW, and non connectable advs viz., BTM_BLE_ADVERT_NONCONN_HIGH, BTM_BLE_ADVERT_NONCONN_LOW a) Set ADV data b) Set Scan Response data if adv type is scannable </dd>
<dd>
2. if adv type is set to Directed then the stack resets any advertisement data which was set for an earlier advertisement. To attempt an UNDIRECTED_ADV after a DIRECTED_ADV, refer to instructions in note 1.</dd></dl>
<p>The <b>advert_mode</b> parameter determines what advertising parameters and durations to use (as specified by the application configuration).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">advert_mode</td><td>: advertisement mode </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">directed_advertisement_bdaddr_type</td><td>: BLE_ADDR_PUBLIC or BLE_ADDR_RANDOM (if using directed advertisement mode) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">directed_advertisement_bdaddr_ptr</td><td>: Directed advertisement address (NULL if not using directed advertisement)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>status </dd></dl>

</div>
</div>
<a id="ga0ba60f6bd5a99be06f8ddd879da9b248"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0ba60f6bd5a99be06f8ddd879da9b248">&#9670;&nbsp;</a></span>wiced_bt_ble_get_current_advert_mode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__wicedbt___device_management.html#gad1d90fe02e687ba52b02f970cb0ad3d3">wiced_bt_ble_advert_mode_t</a> wiced_bt_ble_get_current_advert_mode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get current advertising mode. </p>
<dl class="section return"><dt>Returns</dt><dd>Current advertising mode (refer <a class="el" href="group__wicedbt___device_management.html#ga1942781c78be25d498d93745db416f08" title="advertisement type (used when calling wiced_bt_start_advertisements)">wiced_bt_ble_advert_mode_e</a>) </dd></dl>

</div>
</div>
<a id="gab51079605334c28e06d02f44ffd5ec6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab51079605334c28e06d02f44ffd5ec6b">&#9670;&nbsp;</a></span>wiced_bt_ble_set_raw_advertisement_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a> wiced_bt_ble_set_raw_advertisement_data </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>num_elem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwiced__bt__ble__advert__elem__t.html">wiced_bt_ble_advert_elem_t</a> *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set advertisement raw data to the controller. </p>
<p>Application can invoke <a class="el" href="group__btm__ble__adv__scan__functions.html#ga90a7b45015280a2dcef73a5be07cd561" title="Start advertising.">wiced_bt_start_advertisements</a> after setting the adv data. Max length of the advertising data to be set is 31 bytes. API returns an error if the length of data being set exceeds 31 bytes</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num_elem</td><td>: number of ADV data element </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>: advertisement raw data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>wiced_result_t </dd></dl>

</div>
</div>
<a id="gaed7a2250e3d40e66a23167febfbbebd4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaed7a2250e3d40e66a23167febfbbebd4">&#9670;&nbsp;</a></span>wiced_btm_ble_update_advertisement_filter_policy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gentypes.html#ga2bc92bd117cfd3f6ec4ae452e6ced064">wiced_bool_t</a> wiced_btm_ble_update_advertisement_filter_policy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__wicedbt___common.html#ga9f721100e521471e5a9cc5f9adcd92d4">wiced_bt_ble_advert_filter_policy_t</a>&#160;</td>
          <td class="paramname"><em>advertising_policy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update the advertising filter policy of legacy advertiser. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">advertising_policy</td><td>advertising filter policy</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if successful </dd></dl>

</div>
</div>
<a id="ga7f1db3380fcc8c1a93b3e0f34b302ff0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7f1db3380fcc8c1a93b3e0f34b302ff0">&#9670;&nbsp;</a></span>wiced_bt_ble_set_adv_tx_power()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a> wiced_bt_ble_set_adv_tx_power </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>power</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__wicedbt__dev__utils.html#ga5efde2f4a4954a99dc729af308ce90bf">wiced_bt_dev_vendor_specific_command_complete_cback_t</a> *&#160;</td>
          <td class="paramname"><em>p_cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Command to set LE Advertisement tx power. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">power</td><td>: power value in db </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_cb</td><td>: Result callback (<a class="el" href="structwiced__bt__set__adv__tx__power__result__t.html" title="TX Power Result (in response to wiced_bt_ble_set_adv_tx_power)">wiced_bt_set_adv_tx_power_result_t</a> will be passed to the callback)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>wiced_result_t WICED_BT_PENDING if callback is not NULL. WICED_BT_SUCCESS if callback is NULL </dd></dl>

</div>
</div>
<a id="ga37a11fc558b6587f8c7288aa943edf06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37a11fc558b6587f8c7288aa943edf06">&#9670;&nbsp;</a></span>wiced_bt_ble_read_adv_tx_power()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a> wiced_bt_ble_read_adv_tx_power </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__wicedbt__dev__utils.html#ga2ebace7053dc297ea21b0e97cd0b1ce3">wiced_bt_dev_cmpl_cback_t</a> *&#160;</td>
          <td class="paramname"><em>p_cback</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read LE Advertisement transmit power. </p>
<dl class="section note"><dt>Note</dt><dd>: This API can be used to get Tx power for Legacy advertisements. It will return an error if the application is using Extended Advertisements. See Bluetool Core spec 5.2, Vol 4, Part E, section 3.1.1 Legacy and extended advertising</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_cback</td><td>: Result callback (<a class="el" href="structwiced__bt__tx__power__result__t.html" title="TX Power Result (in response to wiced_bt_dev_read_tx_power)">wiced_bt_tx_power_result_t</a> will be passed to the callback)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">             WICED_BT_PENDING if command issued to controller.
             WICED_BT_NO_RESOURCES if couldn't allocate memory to issue command
             WICED_BT_BUSY if command is already in progress
             WICED_BT_ILLEGAL_VALUE if the callback is NULL
</pre> </dd></dl>

</div>
</div>
<a id="ga575e3d625d0ae6ddae781a855ba538a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga575e3d625d0ae6ddae781a855ba538a2">&#9670;&nbsp;</a></span>wiced_bt_ble_set_raw_scan_response_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_bt_dev_status_t</a> wiced_bt_ble_set_raw_scan_response_data </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>num_elem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwiced__bt__ble__advert__elem__t.html">wiced_bt_ble_advert_elem_t</a> *&#160;</td>
          <td class="paramname"><em>p_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set scan response raw data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num_elem</td><td>: number of scan response data elements </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_data</td><td>: scan response raw data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>status of the operation </dd></dl>

</div>
</div>
<a id="gaead34268d19ff7ea316c687d15714ee9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaead34268d19ff7ea316c687d15714ee9">&#9670;&nbsp;</a></span>wiced_bt_ble_observe()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_bt_dev_status_t</a> wiced_bt_ble_observe </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gentypes.html#ga2bc92bd117cfd3f6ec4ae452e6ced064">wiced_bool_t</a>&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>duration</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__wicedbt___legacy.html#ga171a4706dce6ec6d118ec688e7dab0a4">wiced_bt_ble_scan_result_cback_t</a> *&#160;</td>
          <td class="paramname"><em>p_scan_result_cback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function makes the device start or stop operating in the observer role. </p>
<p>The observer role device receives advertising events from a broadcast device.</p>
<dl class="section note"><dt>Note</dt><dd>This API uses following parameters from the configuration settings <a class="el" href="structwiced__bt__cfg__ble__t.html#a40e0b767868cd73baea1632154787837">wiced_bt_cfg_ble_t::p_ble_scan_cfg</a>, <br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#a39f60ca0d36638d69e8a5dfeb45d05dc">wiced_bt_cfg_ble_scan_settings_t::low_duty_scan_interval</a>,<br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#ab02bcd82a62d0a4b8c44105be0d72739">wiced_bt_cfg_ble_scan_settings_t::low_duty_scan_window</a>, <br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#aa313e57e5adb2036efd86b94a392b856">wiced_bt_cfg_ble_scan_settings_t::scan_mode</a>, <br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#aa313e57e5adb2036efd86b94a392b856">wiced_bt_cfg_ble_scan_settings_t::scan_mode</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">start</td><td>: TRUE to start the observer role </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">duration</td><td>: the duration for the observer role </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_scan_result_cback</td><td>: scan result callback</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>status of the operation </dd></dl>

</div>
</div>
<a id="gac2aa0e611a70b09bfc6c4c48b99abb95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac2aa0e611a70b09bfc6c4c48b99abb95">&#9670;&nbsp;</a></span>wiced_bt_ble_scan()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a> wiced_bt_ble_scan </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__wicedbt___device_management.html#gafaba53a20aad0fb7a2536d9c2df7c96e">wiced_bt_ble_scan_type_t</a>&#160;</td>
          <td class="paramname"><em>scan_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gentypes.html#ga2bc92bd117cfd3f6ec4ae452e6ced064">wiced_bool_t</a>&#160;</td>
          <td class="paramname"><em>duplicate_filter_enable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__wicedbt___legacy.html#ga171a4706dce6ec6d118ec688e7dab0a4">wiced_bt_ble_scan_result_cback_t</a> *&#160;</td>
          <td class="paramname"><em>p_scan_result_cback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start LE scanning. </p>
<p>The <code>scan_type</code> parameter determines what scanning parameters and durations to use (as specified by the application configuration). Scan results are notified using <code>p_scan_result_cback</code> </p>
<dl class="section note"><dt>Note</dt><dd>This API uses following parameters from the configuration settings of <a class="el" href="structwiced__bt__cfg__ble__t.html#a40e0b767868cd73baea1632154787837">wiced_bt_cfg_ble_t::p_ble_scan_cfg</a>,<br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#ab994b84a2607f2582dd1a16d06697695">wiced_bt_cfg_ble_scan_settings_t::high_duty_scan_interval</a>,<br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#a647df2e5b122a0840d66b5a869ae63d6">wiced_bt_cfg_ble_scan_settings_t::high_duty_scan_window</a>,<br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#a536095167d2d9f28fb2bb9137aacc5ea">wiced_bt_cfg_ble_scan_settings_t::high_duty_scan_duration</a>,<br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#a39f60ca0d36638d69e8a5dfeb45d05dc">wiced_bt_cfg_ble_scan_settings_t::low_duty_scan_interval</a>,<br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#ab02bcd82a62d0a4b8c44105be0d72739">wiced_bt_cfg_ble_scan_settings_t::low_duty_scan_window</a>,<br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#abc397a1596ad19729be92a5ea522c97b">wiced_bt_cfg_ble_scan_settings_t::low_duty_scan_duration</a>,<br />
 <a class="el" href="structwiced__bt__cfg__ble__scan__settings__t.html#aa313e57e5adb2036efd86b94a392b856">wiced_bt_cfg_ble_scan_settings_t::scan_mode</a> <br />
</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">scan_type</td><td>: BTM_BLE_SCAN_TYPE_NONE, BTM_BLE_SCAN_TYPE_HIGH_DUTY, BTM_BLE_SCAN_TYPE_LOW_DUTY </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">duplicate_filter_enable</td><td>: TRUE or FALSE to enable or disable duplicate filtering</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_scan_result_cback</td><td>: scan result callback</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>wiced_result_t <br />
 <b> WICED_BT_PENDING </b> : if successfully initiated <br />
<b> WICED_BT_BUSY </b> : if already in progress <br />
<b> WICED_BT_ILLEGAL_VALUE </b> : if parameter(s) are out of range <br />
<b> WICED_BT_NO_RESOURCES </b> : if could not allocate resources to start the command <br />
<b> WICED_BT_WRONG_MODE </b> : if the device is not up. </dd></dl>

</div>
</div>
<a id="ga397017f8e317d9c93785e719d7ca07cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga397017f8e317d9c93785e719d7ca07cf">&#9670;&nbsp;</a></span>wiced_bt_ble_get_current_scan_state()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__wicedbt___device_management.html#gafaba53a20aad0fb7a2536d9c2df7c96e">wiced_bt_ble_scan_type_t</a> wiced_bt_ble_get_current_scan_state </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get current scan state. </p>
<dl class="section return"><dt>Returns</dt><dd>wiced_bt_ble_scan_type_t <br />
 <b> BTM_BLE_SCAN_TYPE_NONE </b> Not scanning <br />
<b> BTM_BLE_SCAN_TYPE_HIGH_DUTY </b> High duty cycle scan <br />
<b> BTM_BLE_SCAN_TYPE_LOW_DUTY </b> Low duty cycle scan </dd></dl>

</div>
</div>
<a id="ga0bea5c2a300878c50f582866fe5b3223"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0bea5c2a300878c50f582866fe5b3223">&#9670;&nbsp;</a></span>wiced_bt_ble_update_scanner_filter_policy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a> wiced_bt_ble_update_scanner_filter_policy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__wicedbt___legacy.html#ga6d09736846bcb960a4fd36934d24bfef">wiced_bt_ble_scanner_filter_policy_t</a>&#160;</td>
          <td class="paramname"><em>scanner_policy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update the scanning filter policy for legacy scanning. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">scanner_policy</td><td>scanning filter policy</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>wiced_result_t </dd></dl>

</div>
</div>
<a id="ga8d62204cf6ab289f977215c08d5864ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8d62204cf6ab289f977215c08d5864ca">&#9670;&nbsp;</a></span>wiced_bt_ble_check_advertising_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t* wiced_bt_ble_check_advertising_data </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_adv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__wicedbt___common.html#ga3764eb118b409b406eedbb158262a91f">wiced_bt_ble_advert_type_t</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>p_length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parse advertising data (returned from scan results callback <a class="el" href="group__wicedbt___legacy.html#ga171a4706dce6ec6d118ec688e7dab0a4" title="Callback to receive legacy scan results.">wiced_bt_ble_scan_result_cback_t</a>). </p>
<dl class="section note"><dt>Note</dt><dd>This function cannot be used for scan results received from <a class="el" href="group__wicedbt___extended.html#ga5a122fd4c1d3220e926a755f59361784" title="Callback for receiving extended scan results.">wiced_ble_ext_scan_result_cback_t</a> Look for specified advertisement data type.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_adv</td><td>: pointer to advertisement data </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>: advertisement data type to look for </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">p_length</td><td>: length of advertisement data (if found)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to start of requested advertisement data (if found). NULL if requested data type not found. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>Bluetooth Host Stack Library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
</body>
</html>
